package com.dv.driverless.service.impl;

import java.util.List;

import com.dv.driverless.domain.EquipmentCrane;
import com.dv.driverless.mapper.EquipmentCraneMapper;
import com.dv.driverless.service.IEquipmentCraneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 行车信息Service业务层处理
 *
 * @author ruoyi
 * @date 2023-04-06
 */
@Service
public class EquipmentCraneServiceImpl implements IEquipmentCraneService
{
    @Autowired
    private EquipmentCraneMapper equipmentCraneMapper;

    /**
     * 查询行车信息
     *
     * @param id 行车信息主键
     * @return 行车信息
     */
    @Override
    public EquipmentCrane selectEquipmentCraneById(Long id)
    {
        return equipmentCraneMapper.selectEquipmentCraneById(id);
    }

    /**
     * 查询行车信息列表
     *
     * @param equipmentCrane 行车信息
     * @return 行车信息
     */
    @Override
    public List<EquipmentCrane> selectEquipmentCraneList(EquipmentCrane equipmentCrane)
    {
        return equipmentCraneMapper.selectEquipmentCraneList(equipmentCrane);
    }

    /**
     * 新增行车信息
     *
     * @param equipmentCrane 行车信息
     * @return 结果
     */
    @Override
    public int insertEquipmentCrane(EquipmentCrane equipmentCrane)
    {
        return equipmentCraneMapper.insertEquipmentCrane(equipmentCrane);
    }

    /**
     * 修改行车信息
     *
     * @param equipmentCrane 行车信息
     * @return 结果
     */
    @Override
    public int updateEquipmentCrane(EquipmentCrane equipmentCrane)
    {
        return equipmentCraneMapper.updateEquipmentCrane(equipmentCrane);
    }

    /**
     * 批量删除行车信息
     *
     * @param ids 需要删除的行车信息主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentCraneByIds(Long[] ids)
    {
        return equipmentCraneMapper.deleteEquipmentCraneByIds(ids);
    }

    /**
     * 删除行车信息信息
     *
     * @param id 行车信息主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentCraneById(Long id)
    {
        return equipmentCraneMapper.deleteEquipmentCraneById(id);
    }

    /**
     * 修改行车状态
     * 
     * @param equipmentCrane 行车信息
     * @return
     */
    @Override
    public int changeEquipmentCrane(EquipmentCrane equipmentCrane) {
        return equipmentCraneMapper.changeCraneStatus(equipmentCrane);
    }
}
